package com.netty.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.netty.common.entity.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author LiuXiaoYu
 * @date 2022/2/1- 11:17
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class User extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 478123456;

    // 用户id
    @TableId(type = IdType.AUTO)
    private Integer userId;
    // 用户名
    private String username;
    // 密码
    private String password;
    // 性别
    private String sex;
    // 头像路径
    private String image;
    // 权限
    private boolean admin;
    // 描述
    private String description;

    @JsonIgnore
    public String getPassword() {
        return password;
    }
}
